struct VS_OUTPUT
{
    float4 dx_Position : SV_Position;
    float4 gl_Position : TEXCOORD9;
    float4 v0 : TEXCOORD0;
    float4 v1 : TEXCOORD1;
    float4 v2 : TEXCOORD2;
    float4 v3 : TEXCOORD3;
    float4 v4 : TEXCOORD4;
    float4 v5 : TEXCOORD5;
    float4 v6 : TEXCOORD6;
    float3 v7 : TEXCOORD7;
    float3 v8 : TEXCOORD8;
};
#pragma warning( disable: 3556 3571 )
int int_ctor(float x0)
{
    return int(x0);
}
// Uniforms

uniform float4x4 _ViewProjVS : register(c1);
uniform float4 _CameraPosVS : register(c5);
uniform float4x4 _LightViewProjTex : register(c6);
uniform float4 _FogInfo : register(c10);
uniform float4 _UserData[3] : register(c11);
uniform float4 _SkeletonData_1[384] : register(c14);
uniform float4x4 _World : register(c398);
#ifdef ANGLE_ENABLE_LOOP_FLATTEN
#define LOOP [loop]
#define FLATTEN [flatten]
#else
#define LOOP
#define FLATTEN
#endif

#define ATOMIC_COUNTER_ARRAY_STRIDE 4

// Attributes
static float4 _POSITION = {0, 0, 0, 0};
static float4 _NORMAL = {0, 0, 0, 0};
static float2 _TEXCOORD0 = {0, 0};
static float4 _TANGENT = {0, 0, 0, 0};
static float4 _BINORMAL = {0, 0, 0, 0};
static float4 _BLENDWEIGHT = {0, 0, 0, 0};
static float4 _BLENDINDICES = {0, 0, 0, 0};

static float4 gl_Position = float4(0, 0, 0, 0);

// Varyings
static  float4 _xlv_TEXCOORD0 = {0, 0, 0, 0};
static  float4 _xlv_TEXCOORD1 = {0, 0, 0, 0};
static  float4 _xlv_TEXCOORD2 = {0, 0, 0, 0};
static  float4 _xlv_TEXCOORD3 = {0, 0, 0, 0};
static  float4 _xlv_TEXCOORD4 = {0, 0, 0, 0};
static  float3 _xlv_TEXCOORD5 = {0, 0, 0};
static  float3 _xlv_TEXCOORD6 = {0, 0, 0};
static  float4 _xlv_TEXCOORD7 = {0, 0, 0, 0};
static  float4 _xlv_TEXCOORD8 = {0, 0, 0, 0};

cbuffer DriverConstants : register(b1)
{
    float4 dx_ViewAdjust : packoffset(c1);
    float2 dx_ViewCoords : packoffset(c2);
    float2 dx_ViewScale  : packoffset(c3);
    float clipControlOrigin : packoffset(c3.w);
    float clipControlZeroToOne : packoffset(c4);
};

struct VS_INPUT
{
    float4 _POSITION : TEXCOORD0;
    float4 _NORMAL : TEXCOORD1;
    float2 _TEXCOORD0 : TEXCOORD2;
    float4 _TANGENT : TEXCOORD3;
    float4 _BINORMAL : TEXCOORD4;
    float4 _BLENDWEIGHT : TEXCOORD5;
    uint4 _BLENDINDICES : TEXCOORD6;
};

void initAttributes(VS_INPUT input)
{
    _POSITION = input._POSITION;
    _NORMAL = input._NORMAL;
    _TEXCOORD0 = input._TEXCOORD0;
    _TANGENT = input._TANGENT;
    _BINORMAL = input._BINORMAL;
    _BLENDWEIGHT = input._BLENDWEIGHT;
    _BLENDINDICES = float4(input._BLENDINDICES);
}


VS_OUTPUT generateOutput(VS_INPUT input)
{
    VS_OUTPUT output;
    output.gl_Position = gl_Position;
    output.dx_Position.x = gl_Position.x;
    output.dx_Position.y = clipControlOrigin * gl_Position.y;
    if (clipControlZeroToOne)
    {
        output.dx_Position.z = gl_Position.z;
    } else {
        output.dx_Position.z = (gl_Position.z + gl_Position.w) * 0.5;
    }
    output.dx_Position.w = gl_Position.w;
    output.v0 = _xlv_TEXCOORD0;
    output.v1 = _xlv_TEXCOORD1;
    output.v2 = _xlv_TEXCOORD2;
    output.v3 = _xlv_TEXCOORD3;
    output.v4 = _xlv_TEXCOORD4;
    output.v5 = _xlv_TEXCOORD7;
    output.v6 = _xlv_TEXCOORD8;
    output.v7 = _xlv_TEXCOORD5;
    output.v8 = _xlv_TEXCOORD6;

    return output;
}

VS_OUTPUT main(VS_INPUT input){
    initAttributes(input);

float3 _tmpvar_13097 = {0, 0, 0};
float4 _tmpvar_23098 = {0, 0, 0, 0};
(_tmpvar_23098.w = 1.0);
(_tmpvar_23098.xyz = _POSITION.xyz);
(_tmpvar_13097 = ((_NORMAL.xyz * 2.0) - 1.0));
float3 _tmpvar_33099 = {0, 0, 0};
(_tmpvar_33099 = normalize(_TANGENT.xyz));
float3 _tmpvar_43100 = {0, 0, 0};
(_tmpvar_43100 = normalize(_BINORMAL.xyz));
float4 _tmpvar_53101 = {0, 0, 0, 0};
(_tmpvar_53101.w = _tmpvar_23098.w);
int _idx_63102 = {0};
(_idx_63102 = int_ctor(_BLENDINDICES.x));
int _idx_73103 = {0};
(_idx_73103 = int_ctor(_BLENDINDICES.y));
int _idx_83104 = {0};
(_idx_83104 = int_ctor(_BLENDINDICES.z));
int _idx_93105 = {0};
(_idx_93105 = int_ctor(_BLENDINDICES.w));
float4 _tmpvar_103106 = {0, 0, 0, 0};
(_tmpvar_103106 = ((((_BLENDWEIGHT.x * _SkeletonData_1[(3 * _idx_63102)]) + (_BLENDWEIGHT.y * _SkeletonData_1[(3 * _idx_73103)])) + (_BLENDWEIGHT.z * _SkeletonData_1[(3 * _idx_83104)])) + (_BLENDWEIGHT.w * _SkeletonData_1[(3 * _idx_93105)])));
float4 _tmpvar_113107 = {0, 0, 0, 0};
(_tmpvar_113107 = ((((_BLENDWEIGHT.x * _SkeletonData_1[((3 * _idx_63102) + 1)]) + (_BLENDWEIGHT.y * _SkeletonData_1[((3 * _idx_73103) + 1)])) + (_BLENDWEIGHT.z * _SkeletonData_1[((3 * _idx_83104) + 1)])) + (_BLENDWEIGHT.w * _SkeletonData_1[((3 * _idx_93105) + 1)])));
float4 _tmpvar_123108 = {0, 0, 0, 0};
(_tmpvar_123108 = ((((_BLENDWEIGHT.x * _SkeletonData_1[((3 * _idx_63102) + 2)]) + (_BLENDWEIGHT.y * _SkeletonData_1[((3 * _idx_73103) + 2)])) + (_BLENDWEIGHT.z * _SkeletonData_1[((3 * _idx_83104) + 2)])) + (_BLENDWEIGHT.w * _SkeletonData_1[((3 * _idx_93105) + 2)])));
float3 _tmpvar_133109 = {0, 0, 0};
(_tmpvar_133109.x = dot(_tmpvar_103106.xyz, _POSITION.xyz));
(_tmpvar_133109.y = dot(_tmpvar_113107.xyz, _POSITION.xyz));
(_tmpvar_133109.z = dot(_tmpvar_123108.xyz, _POSITION.xyz));
float3 _tmpvar_143110 = {0, 0, 0};
(_tmpvar_143110.x = _tmpvar_103106.w);
(_tmpvar_143110.y = _tmpvar_113107.w);
(_tmpvar_143110.z = _tmpvar_123108.w);
(_tmpvar_53101.xyz = (_tmpvar_133109 + _tmpvar_143110));
float3 _tmpvar_153111 = {0, 0, 0};
(_tmpvar_153111.x = dot(_tmpvar_103106.xyz, _tmpvar_13097));
(_tmpvar_153111.y = dot(_tmpvar_113107.xyz, _tmpvar_13097));
(_tmpvar_153111.z = dot(_tmpvar_123108.xyz, _tmpvar_13097));
float3 _tmpvar_163112 = {0, 0, 0};
(_tmpvar_163112.x = dot(_tmpvar_103106.xyz, _tmpvar_33099));
(_tmpvar_163112.y = dot(_tmpvar_113107.xyz, _tmpvar_33099));
(_tmpvar_163112.z = dot(_tmpvar_123108.xyz, _tmpvar_33099));
float3 _tmpvar_173113 = {0, 0, 0};
(_tmpvar_173113.x = dot(_tmpvar_103106.xyz, _tmpvar_43100));
(_tmpvar_173113.y = dot(_tmpvar_113107.xyz, _tmpvar_43100));
(_tmpvar_173113.z = dot(_tmpvar_123108.xyz, _tmpvar_43100));
float4 _tmpvar_183114 = {0, 0, 0, 0};
float4 _tmpvar_193115 = {0, 0, 0, 0};
float4 _tmpvar_203116 = {0, 0, 0, 0};
float4 _tmpvar_213117 = {0, 0, 0, 0};
(_tmpvar_213117.w = 1.0);
(_tmpvar_213117.xyz = _tmpvar_53101.xyz);
float4 _tmpvar_223118 = {0, 0, 0, 0};
(_tmpvar_223118.w = 1.0);
(_tmpvar_223118.xyz = mul(_tmpvar_213117, transpose(_World)).xyz);
float3x3 _tmpvar_233119 = {0, 0, 0, 0, 0, 0, 0, 0, 0};
(_tmpvar_233119[0] = _World[0].xyz);
(_tmpvar_233119[1] = _World[1].xyz);
(_tmpvar_233119[2] = _World[2].xyz);
(_tmpvar_183114.xyz = normalize(mul(_tmpvar_153111, transpose(_tmpvar_233119))));
float3x3 _tmpvar_243120 = {0, 0, 0, 0, 0, 0, 0, 0, 0};
(_tmpvar_243120[0] = _World[0].xyz);
(_tmpvar_243120[1] = _World[1].xyz);
(_tmpvar_243120[2] = _World[2].xyz);
float3x3 _tmpvar_253121 = {0, 0, 0, 0, 0, 0, 0, 0, 0};
(_tmpvar_253121[0] = _World[0].xyz);
(_tmpvar_253121[1] = _World[1].xyz);
(_tmpvar_253121[2] = _World[2].xyz);
(_tmpvar_193115.xyz = (_tmpvar_223118.xyz - _CameraPosVS.xyz));
float _T_263122 = {0};
float _fHeightCoef_273123 = {0};
float _GameTimeFog2_283124 = {0};
float _GameTimeFog_293125 = {0};
float4 _tmpvar_303126 = {0, 0, 0, 0};
(_tmpvar_303126.x = _UserData[0].w);
(_tmpvar_303126.y = (_UserData[0].w * 2.0));
(_tmpvar_303126.z = (_UserData[0].w * 5.0));
(_tmpvar_303126.w = (_UserData[0].w * 5.5));
float4 _tmpvar_313127 = {0, 0, 0, 0};
(_tmpvar_313127.x = (0.75 * _UserData[1].w));
(_tmpvar_313127.y = (0.5 * _UserData[1].w));
(_tmpvar_313127.z = (-1.5 * _UserData[1].w));
(_tmpvar_313127.w = (-1.25 * _UserData[1].w));
(_GameTimeFog_293125 = ((0.1 * sin((((_tmpvar_303126.x * 0.001) * _tmpvar_223118.x) + (_tmpvar_313127.x * _CameraPosVS.w)))) * sin((((_tmpvar_303126.y * 0.001) * _tmpvar_223118.z) + (_tmpvar_313127.y * _CameraPosVS.w)))));
(_GameTimeFog_293125 = (_GameTimeFog_293125 + (0.050000001 * clamp((sin((((_tmpvar_303126.x * 0.0074999998) * _tmpvar_223118.x) + ((1.0 + _tmpvar_313127.x) * _CameraPosVS.w))) * sin((((_tmpvar_303126.y * 0.0049999999) * _tmpvar_223118.z) + ((1.0 + _tmpvar_313127.y) * _CameraPosVS.w)))), 0.0, 1.0))));
(_GameTimeFog2_283124 = (_GameTimeFog_293125 + ((0.029999999 * sin((((_tmpvar_303126.z * 0.001) * _tmpvar_223118.x) + (_tmpvar_313127.z * _CameraPosVS.w)))) * sin((((_tmpvar_303126.w * 0.001) * _tmpvar_223118.z) + (_tmpvar_313127.w * _CameraPosVS.w))))));
(_GameTimeFog_293125 = (_GameTimeFog_293125 * _UserData[2].z));
(_GameTimeFog2_283124 = (_GameTimeFog2_283124 * _UserData[2].z));
float _tmpvar_323128 = {0};
(_tmpvar_323128 = clamp(((_tmpvar_223118.y * _FogInfo.z) + (_FogInfo.w * (1.0 + ((_GameTimeFog2_283124 * clamp((1.0 - _tmpvar_223118.y), 0.0, 1.0)) * 1.25)))), 0.0, 1.0));
(_fHeightCoef_273123 = (_tmpvar_323128 * _tmpvar_323128));
(_fHeightCoef_273123 = (_fHeightCoef_273123 * _fHeightCoef_273123));
float _tmpvar_333129 = {0};
(_tmpvar_333129 = ((1.0 + (0.25 * _GameTimeFog_293125)) - exp(((-max(0.0, (sqrt(dot(_tmpvar_193115.xyz, _tmpvar_193115.xyz)) - _FogInfo.x))) * max((_FogInfo.y * _fHeightCoef_273123), ((0.1 * _FogInfo.y) - (0.00019999999 * _GameTimeFog_293125)))))));
(_T_263122 = (_tmpvar_333129 * _tmpvar_333129));
float _tmpvar_343130 = {0};
(_tmpvar_343130 = min(_T_263122, 1.0));
(_T_263122 = _tmpvar_343130);
(_tmpvar_193115.w = _tmpvar_343130);
(_tmpvar_203116.xyz = float3(0.0, 0.0, 0.0));
(_tmpvar_203116.w = 0.0);
float4 _tmpvar_353131 = {0, 0, 0, 0};
(_tmpvar_353131.w = 0.0);
(_tmpvar_353131.xyz = _tmpvar_183114.xyz);
float4 _tmpvar_363132 = {0, 0, 0, 0};
float4 _tmpvar_373133 = {0, 0, 0, 0};
(_tmpvar_373133.w = 1.0);
(_tmpvar_373133.xyz = _tmpvar_223118.xyz);
(_tmpvar_363132 = mul(_tmpvar_373133, transpose(_ViewProjVS)));
(gl_Position.xyw = _tmpvar_363132.xyw);
(_xlv_TEXCOORD0 = _TEXCOORD0.xyxy);
(_xlv_TEXCOORD1 = _tmpvar_223118);
(_xlv_TEXCOORD2 = _tmpvar_183114);
(_xlv_TEXCOORD3 = _tmpvar_193115);
(_xlv_TEXCOORD4 = _tmpvar_203116);
(_xlv_TEXCOORD5 = normalize(clamp(mul(_tmpvar_163112, transpose(_tmpvar_243120)), -2.0, 2.0)));
(_xlv_TEXCOORD6 = normalize(clamp(mul(_tmpvar_173113, transpose(_tmpvar_253121)), -2.0, 2.0)));
(_xlv_TEXCOORD7 = mul((_tmpvar_223118 + (_tmpvar_353131 * 0.001)), transpose(_LightViewProjTex)));
(_xlv_TEXCOORD8 = _POSITION);
(gl_Position.z = ((_tmpvar_363132.z * 2.0) - _tmpvar_363132.w));
return generateOutput(input);
}